#if !defined(AFX_CAMERA_H__7CE4A2E2_CD97_44D2_B9D2_DDF305EA55A6__INCLUDED_)
#define AFX_CAMERA_H__7CE4A2E2_CD97_44D2_B9D2_DDF305EA55A6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ace/Event_Handler.h"
#include "ace/SOCK_Acceptor.h"
#include "ace/Reactor.h"


class CStreamClient_Acceptor :
	public ACE_Event_Handler
{
public:
	CStreamClient_Acceptor(ACE_Reactor *reactor = ACE_Reactor::instance ())
		:ACE_Event_Handler(reactor) {};
	~CStreamClient_Acceptor(void) {};

	virtual int open (u_short serverport);
	virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
	virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, ACE_Reactor_Mask = 0);
	virtual ACE_HANDLE get_handle() const { return this->acceptor_.get_handle(); };

	ACE_SOCK_Acceptor &acceptor() { return this->acceptor_; };
	int close() {	reactor()->remove_handler(this, ACCEPT_MASK);return 0;};

protected:
	ACE_SOCK_Acceptor acceptor_;

};

#endif